//
//  DaiGouCell.m
//  MyTest
//
//  Created by zhiyou on 16-4-13.
//  Copyright (c) 2016年 wangyang. All rights reserved.
//

#import "DaiGouCell.h"

@implementation DaiGouCell

- (void)awakeFromNib {
    // Initialization code
}
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero];
        label.font = [UIFont systemFontOfSize:13];
        label.text = @"热门代购";
        [self.contentView addSubview:label];
        
        [label mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.offset(5);
            make.top.offset(0);
            make.width.equalTo(self.mas_width).multipliedBy(.5);
            make.height.equalTo(self.mas_height).multipliedBy(.2);
        }];
        UIImageView *lineView = [[UIImageView alloc] initWithFrame:CGRectZero];
        lineView.image = [UIImage imageNamed:@"midLine"];
        [self.contentView addSubview:lineView];
        
        [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(label.mas_bottom);
            make.width.equalTo(self.mas_width);
            make.height.offset(2);
        }];
        
        _imgView1 = [[UIImageView alloc] initWithFrame:CGRectZero];
        _imgView1.userInteractionEnabled = YES;
        _imgView1.tag = 100;
        [self.contentView addSubview:_imgView1];
        
        [_imgView1 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.offset(0);
            make.top.equalTo(lineView.mas_bottom).offset(0);
            make.width.equalTo(self.mas_width).multipliedBy(.33);
            make.height.equalTo(self.mas_height).multipliedBy(.5);
        }];
        
        _imgView2 = [[UIImageView alloc] initWithFrame:CGRectZero];
        _imgView2.tag = 101;
        _imgView2.userInteractionEnabled = YES;
        [self.contentView addSubview:_imgView2];
        
        [_imgView2 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(_imgView1.mas_right).offset(0);
            make.top.equalTo(lineView.mas_bottom).offset(0);
            make.width.equalTo(self.mas_width).multipliedBy(.33);
            make.height.equalTo(self.mas_height).multipliedBy(.5);
        }];
        
        _imgView3 = [[UIImageView alloc] initWithFrame:CGRectZero];
        _imgView3.tag = 102;
        _imgView3.userInteractionEnabled = YES;
        [self.contentView addSubview:_imgView3];
        
        [_imgView3 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(_imgView2.mas_right).offset(0);
            make.top.equalTo(lineView.mas_bottom).offset(0);
            make.width.equalTo(self.mas_width).multipliedBy(.33);
            make.height.equalTo(self.mas_height).multipliedBy(.5);
        }];
        
        _imgView4 = [[UIImageView alloc] initWithFrame:CGRectZero];
        _imgView4.tag = 103;
        _imgView4.userInteractionEnabled = YES;
        [self.contentView addSubview:_imgView4];
        
        [_imgView4 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.offset(0);
            make.top.equalTo(_imgView1.mas_bottom).offset(0);
            make.width.equalTo(self.mas_width).multipliedBy(.66);
            make.height.equalTo(self.mas_height).multipliedBy(.25);
        }];
        
        _imgView5 = [[UIImageView alloc] initWithFrame:CGRectZero];
        _imgView5.tag = 104;
        _imgView5.userInteractionEnabled = YES;
        [self.contentView addSubview:_imgView5];
        
        [_imgView5 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(_imgView4.mas_right).offset(0);
            make.top.equalTo(_imgView3.mas_bottom).offset(0);
            make.width.equalTo(self.mas_width).multipliedBy(.34);
            make.height.equalTo(self.mas_height).multipliedBy(.25);
        }];
    }
    return self;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
